package com.test.timmy;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Immutable.
 */
public class Changes
{
	public static final String TAG_MORALE = "morale";
	public static final String TAG_HUMOUR = "humour";
	public static final String TAG_SKILL = "skill"; 
	
	private JSONObject details;
	
	public Changes(JSONObject details)
			throws NumberFormatException, JSONException
	{
		setDetails(details);
	}
	
	public void setDetails(JSONObject details)
	{
		this. details = details;
	}

	public JSONObject getDetails()
	{
		return details;
	}

	public int getMorale()
			throws NumberFormatException, JSONException
	{
		return Integer.valueOf(details.getString(TAG_MORALE));
	}

	public int getHumour()
			throws NumberFormatException, JSONException
	{
		return Integer.valueOf(details.getString(TAG_HUMOUR));
	}

	public int getSkill()
			throws NumberFormatException, JSONException
	{
		return Integer.valueOf(details.getString(TAG_SKILL));
	}

}
